Warn when running x32 game on x64 system #3134
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Infrastructure "Warn when running x32 game on x64 system"
Purpose of change
Many people still don't know the difference between x64 and x32, and it's getting old explaining what these mean when they come complaining about OOM crashes.
Describe the solution
Add a warning on game start that explains what's wrong and how it can be fixed.
The warning will show only when the game is completely sure it is a x32 build running on a x64 os; if detection fails, or cannot be done, the warning isn't shown to avoid false positives.
Additionally, the game will now report bitness in the debug log on launch.
Describe alternatives you've considered
Dropping x32 builds.
Testing
Warning shows properly on Windows with Visual Studio build (x32 and x64 builds on x64 os).
I didn't bother figuring out how to cross-compile for x32 on linux, but it should work as well.